package com.kitty.game.gm.handler100;

import com.kitty.common.utils.SpringUtils;
import com.kitty.game.base.service.BagService;
import com.kitty.game.equip.service.EquipService;
import com.kitty.game.role.model.Role;
import com.kitty.game.team.message.RespMsg;
import com.kitty.mina.message.MessagePusher;

public class NCShoushi implements NCGmFather {
    @Override
    public void handle(Role role, String name) {
        EquipService equipService = SpringUtils.getBean(EquipService.class);
        BagService bagService = SpringUtils.getBean(BagService.class);
        short pos = bagService.getPos(role, false);
        if (pos >= 41) {
            equipService.getJewelry(role, name, false, 1, true);
        }
        MessagePusher.pushMessage(role, new RespMsg("发送首饰成功！"));
    }
}
